package com.example.demo.pojo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;
public class Teacher {
    private Integer tid;

    private String tname;

    private Integer ttel;

    private String uid;
    public Teacher(Integer tid, String tname, Integer ttel, String uid) {
        this.tid = tid;
        this.tname = tname;
        this.ttel = ttel;
        this.uid = uid;
    }

    public Integer getTid() {
        return tid;
    }
    //一对多
    private List<Course> courseList;

    public List<Course> getCourseList() {
        return courseList;
    }
    public void setCourseList(List<Course> courseList) {
        this.courseList = courseList;
    }
    public void setTid(Integer tid) {
        this.tid = tid;
    }

    public String getTname() {
        return tname;
    }

    public void setTname(String tname) {
        this.tname = tname == null ? null : tname.trim();
    }

    public Integer getTtel() {
        return ttel;
    }

    public void setTtel(Integer ttel) {
        this.ttel = ttel;
    }

    public String getUid() {
        return uid;
    }

    public void setUid(String uid) {
        this.uid = uid == null ? null : uid.trim();
    }

    @Override
    public String toString() {
        return "Teacher{" +
                "tid=" + tid +
                ", tname='" + tname + '\'' +
                ", ttel=" + ttel +
                ", uid='" + uid + '\'' +
                ", courseList=" + courseList +
                '}';
    }
}